# Copyright 2021, Régis Décamps
# SPDX-License-Identifier: BSD-3-Clause

package(default_visibility = ["//jflex:visibility"])

package_group(
    name = "visibility",
    packages = [
        "//java/...",
        "//javatests/...",
        "//jflex/...",
        "//testsuite/...",
    ],
)

java_binary(
    name = "jflex_bin",
    main_class = "jflex.TestDrive",
    runtime_deps = [
        "//jflex/src/main/java/jflex:jflex_ui",
        "//third_party/java_cup:runtime",
    ],
)

alias(
    name = "jflex",
    actual = "//jflex/src/main/java/jflex/core",
)

java_library(
    name = "resources",
    resources = glob(["src/main/resources/**"]),
)

# Test helpers
alias(
    name = "testing",
    actual = "//jflex/src/test/java/jflex/testing",
)

# Tests
filegroup(
    name = "test_data",
    srcs = glob(["src/test/resources/**"]),
)
